package com.itheima.day07;

import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {

        String[] arr = {"星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"};
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入数字：");
        int next = scanner.nextInt();

        try {
        String s = arr[next - 1];

            System.out.println("程序提示"+s);
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("程序提示：输入错误！！");
        }

    }
}
